package io;


import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ObjectInputStreamDemo01 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois =
                new ObjectInputStream(
                        new FileInputStream("message.txt"));


        Message message = (Message) ois.readObject();
        System.out.println(message);

        ois.close();



    }
}
